package com.example.baiduapi.serviceListener.newListerner.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.example.baiduapi.domain.AjaxResult;
import com.example.baiduapi.serviceListener.newListerner.config.ServiceNameEvent;
import com.example.baiduapi.serviceListener.service.MvcService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@ServiceNameEvent(beanName = "MvcService1")
@Service
@Slf4j
public class MvcService1 implements MvcService {
    @Override
    public AjaxResult mvcFunction(JSONObject params) {
        log.info("MvcService1参数为：{}",params);
        HashMap<Object, Object> result = new HashMap<>();
        result.put("beanPath",this.getClass().getName());
        result.put("params",params);
        return AjaxResult.success("获取成功",result);
    }
}
